package Expe10;

/**
 * @Author 28021
 * @Date 2022/11/15
 */
public class Test1 {
    public static void main(String[] args) {
        Geometry bottom;
        bottom = new Rectangle(12,22);

        Pillar pillar;
        pillar = new Pillar(bottom,58);
        System.out.println("长方体的体积为："+pillar.getVolume());

        bottom = new Circle(6);
        pillar = new Pillar(bottom,58);
        System.out.println("圆柱体的体积为："+pillar.getVolume());

        bottom = new Triangular(3,4,5);
        pillar = new Pillar(bottom,58);
        System.out.println("三棱柱的体积为："+pillar.getVolume());
    }
}
